package 装饰模式.Rooms;

import 装饰模式.Room;
import 装饰模式.Rooms.Bedroom;
import 装饰模式.Rooms.Kitchen;
import 装饰模式.Rooms.Parlour;

/**
 * 文 件 名 称：RoomFactory.
 * 文 件 说 明：
 * 创   建   人：zpen.
 * 创 建 时 间：2018/5/7 17:22.
 */
public class RoomFactory {
    Room room = null;

    public Room getRoom(String type){
        switch (type){
            case "ki":
                room = new Kitchen();
                break;
            case "be":
                room = new Bedroom();
                break;
            case "pa":
                room = new Parlour();
                break;
        }

        return room;
    }
}
